package com.asset.dispoal.business.bsAgreement.service.converter;

import com.asset.dispoal.business.bsAgreement.domain.db.entity.Agreement;
import com.asset.dispoal.business.bsAgreement.domain.db.entity.AgreementExpand;
import com.asset.dispoal.business.bsAgreement.dto.AgreementDataRequest;
import com.asset.dispoal.business.bsAgreement.dto.AgreementRequest;
import com.asset.dispoal.business.bsAgreement.dto.AgreementResponse;
import com.asset.dispoal.business.bsBorrowDetail.domain.db.entity.BorrowDetail;
import com.asset.dispoal.business.bsBorrower.domain.db.entity.Borrower;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author qr
 * @date 2022/4/12$
 */
@Mapper
public interface AgreementConverter {

    AgreementConverter INSTANCE = Mappers.getMapper(AgreementConverter.class);


    Agreement reqToDo(AgreementRequest request);


    List<AgreementResponse> dosToRes(List<Agreement> request);


    Agreement reqDataToAgreement(AgreementDataRequest agreementDataRequest);

    AgreementExpand reqDataToAgreementExpand(AgreementDataRequest agreementDataRequest);

    BorrowDetail reqDataToBorrowDetail(AgreementDataRequest agreementDataRequest);


    Borrower reqDataToBorrower(AgreementDataRequest agreementDataRequest);


}
